<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>


<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%-- ssx --%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath %>">
<title>今日特价</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<%-- 引用layui.css --%>
<link rel="stylesheet" type="text/css" href="<%=basePath %>js/layui/css/layui.css" />
<link rel="stylesheet" type="text/css"href="<%=basePath %>css/common.css" />
</head>
<boday>
<style>


.layui-btn-lg{
margin-left:195px;
	margin-right: 60px;
}

</style>


       
  <form class="layui-form " lay-filter="gcForm" id="gcForm" action="" style="margin:40px;">
	  
	  <div class="layui-form-item ">
	      <label class="layui-form-label ">特价ID:</label>
	      <div class="layui-input-block">
	        <input Readonly="false" type="text" name="id" required lay-verify="required"  autocomplete="off" class="layui-input">
	      </div>
	    </div>
	  
	  
	  <div class="layui-form-item">
	  
	    <label class="layui-form-label">特价主题：</label>
	     <div class="layui-input-block">
	    <input type="text" name="title" required lay-verify="required"  autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  
	  <div class="layui-form-item">
	    <label class="layui-form-label"> 特价商品：</label>
	    <div class="layui-input-block">
	      <input type="text" name="commodity" required lay-verify="required"  autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  
	  <div class="layui-form-item">
	  
	    <label class="layui-form-label"> 价格：</label>
	    <div class="layui-input-block">
	       <input type="text" name="price" required lay-verify="required"  autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  
	  <div class="layui-form-item">
	    
	      <label class="layui-form-label">单位:</label>
	      <div class="layui-input-block">
           <input type="text" name="company" required lay-verify="required"  autocomplete="off" class="layui-input">	      </div>
	    </div>
	    </div>
	    
	    <div class="layui-btn-container">
        <button type="button" class="layui-btn layui-btn-radius layui-btn layui-btn-lg" lay-submit lay-filter="baocun" >保存</button>
        <button type="button" class="layui-btn layui-btn-radius layui-btn-normal layui-btn layui-btn-lg" lay-submit lay-filter="quxiao">取消</button>
      </div> 
	    
	  </div>
 </form>
 
     
      
   <script type="text/javascript" src="<%=basePath %>js/layui/layui.js"></script>        
   <script type="text/javascript">
			layui.config({
			    base: "<%=basePath%>/js/common/"
			}).use(["common", "element", "layer", "form", "table", "jquery"], function(){
					var elem = layui.element;
					var layer = layui.layer;
					var form = layui.form;
					var table = layui.table;
					var $ = layui.jquery;
					layui.common.init();
			  
			  
		  //监听提交
		  form.on('submit(baocun)', function(data){
			  var index = parent.layer.getFrameIndex(window.name);
			  parent.layer.close(index);
			  $.ajax({
		        	url: "todayss/update.do",
		        	method:"post",
		        	data:data.field
			  });
			  return false;
		});
		  form.on('submit(quxiao)', function(data){
			  var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
			  parent.layer.close(index);
			  return false;
		});
		  
});	  
</script>
</boday>
</html>